using System;
using System.Collections;
using System.Collections.Generic;
namespace Circus.Syntax.Lexer
{
	public class LexStyles : List<LexStyle>, IList<LexStyle>, ICollection<LexStyle>, IEnumerable<LexStyle>, IEnumerable
	{
		private LexScheme owner;
		public LexStyles(LexScheme owner)
		{
			this.owner = owner;
		}
		public virtual LexStyle AddLexStyle()
		{
			LexStyle lexStyle = new LexStyle(this.owner);
			base.Add(lexStyle);
			return lexStyle;
		}
		public virtual LexStyle InsertLexStyle(int index)
		{
			LexStyle lexStyle = new LexStyle();
			base.Insert(index, lexStyle);
			return lexStyle;
		}
		public virtual LexStyle FindLexStyle(string name)
		{
			LexStyle result;
			foreach (LexStyle current in this)
			{
				if (current.Name == name)
				{
					result = current;
					return result;
				}
			}
			result = null;
			return result;
		}
	}
}
